#exerc3.py  系统随机生成8个1-33的整数形成一注中奖号码，用户在控制台输入8位数字看是否中奖
from random import *
n = input("请输入8位数字:")
#随机生成8个1-33的整数形成一注中奖号码
def winning():
    ls = []
    for i in range(8):
        a = randint(1,33)
        ls.append(a)
    return ls
#判断是否中奖
def isWinning():
    ls = winning()
    temp = 0   #统计号码对的个数
    for i in ls:
        for j in n:
            if i == j:
                temp += 1
    if temp == 8:
        print("恭喜您，中了一等奖!")
    elif temp == 7:
        print("恭喜您，中了二等奖!")
    elif temp == 6:
        print("恭喜您，中了三等奖!")
    elif temp == 5:
        print("恭喜您，中了四等奖!")
    else:
        print("很遗憾，您未中奖！")
isWinning()